// iefd.dll

#ifdef IEFD_EXPORTS
#define IEFD_API __declspec(dllexport)
#else
#define IEFD_API __declspec(dllimport)
#endif


// CONSTANTS ////////////////////////////////////

#define IEFD_HIPAS 0	// high pass
#define IEFD_LOPAS 1	// low pass

#define IEFD_FORWD 0	// forward
#define IEFD_INVER 1	// inverse

// STRUCTURES ///////////////////////////////////

typedef struct tagFreqDomainFileHeader {
	size_t iwidth;	// image width
	size_t iheight;	// image height
	size_t fwidth;	// frequence domain width
	size_t fheight;	// frequence domain height
} FREQDOMAINFILEHEADER, *PFREQDOMAINFILEHEADER;

typedef struct tagFreqDomain {
	PFREQDOMAINFILEHEADER	header;	// file header
	double *				data;	// data (commonly, a view object)
	size_t					width;	// frequence domain width
	size_t					height;	// frequence domain height
} FREQDOMAIN, *PFREQDOMAIN;

// FUNCTIONS ////////////////////////////////////

IEFD_API BOOL IEFD_LoadFile		(HANDLE, PFREQDOMAIN);			// Load frequence domain file
IEFD_API BOOL IEFD_SaveFile		(HANDLE, PFREQDOMAIN);			// Save frequence domain file

IEFD_API BOOL IEFD_ButterWorth	(PFREQDOMAIN, int, int);		// Butter Worth filtering
IEFD_API BOOL IEFD_Exponent		(PFREQDOMAIN, int, int, int);	// Exponent filtering
IEFD_API BOOL IEFD_FourierSpec	(PFREQDOMAIN, PFREQDOMAIN);		// Fourier specturm
IEFD_API BOOL IEFD_Gradient		(PFREQDOMAIN, int, int);		// Grandient filtering
IEFD_API BOOL IEFD_Ideal		(PFREQDOMAIN, int);				// Ideal filtering

IEFD_API BOOL IEFD_FFT			(PFREQDOMAIN, PFREQDOMAIN);		// Fast fourier transformation
IEFD_API BOOL IEFD_FFT2D		(PFREQDOMAIN, PFREQDOMAIN);		// Fast fourier 2d transformation

IEFD_API BOOL IEFD_CVT2IMG		(PFREQDOMAIN, PIMAGE);			// Convert a 2d complex array to a gray-level image
IEFD_API BOOL IEFD_CVT2COM		(PIMAGE, PFREQDOMAIN);			// Convert a gray-level image to a 2d complex